package com.ds.infrastructure.hyperspace.console.model.response.environment;

import com.ds.infrastructure.hyperspace.console.entity.table.TbEnvironment;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: yaozhendong
 * @create: 2019-09-18 11:56
 **/
@Data
@NoArgsConstructor
public class ListEnvironmentVO {
    private Long id;

    private String environmentName;

    private Integer usageState;

    private String description;

    private Date gmtModified;

    private Date gmtCreate;

    public static ListEnvironmentVO toVO(TbEnvironment entity) {
        ListEnvironmentVO listEnvironmentVO = new ListEnvironmentVO();
        listEnvironmentVO.setId(entity.getId());
        listEnvironmentVO.setEnvironmentName(entity.getEnvironmentName());
        listEnvironmentVO.setUsageState(entity.getUsageState());
        listEnvironmentVO.setDescription(entity.getDescription());
        listEnvironmentVO.setGmtModified(entity.getGmtModified());
        listEnvironmentVO.setGmtCreate(entity.getGmtCreate());
        return listEnvironmentVO;
    }
}
